package com.hmall.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.user.pojo.Address;
import com.hmall.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from tb_address where user_id=2")
    List<Address> getById(Long userId);

    @Select("select * from tb_address where id=59")
    Address getAddressId(Long id);

}
